Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert GVFS.Hooks to C++ #1426

Closed
wants to merge 6 commits into from
Closed

Conversation

wilbaker
Copy link
Member

@wilbaker wilbaker commented Aug 6, 2019

NOTE: Still a work in progress - this was something I hacked out that still needs cleanup

Resolves #716

Convert GVFS.Hooks from C# to C++

TODO:

Follow up work (separate PRs):

  • Remove the *.Shared.cs files that existed only to be shared with GVFS.Hooks

@@ -0,0 +1,18 @@
#pragma once

inline std::vector<std::string> String_Split(char deliminator, const std::string toSplit)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const std::string toSplit -> const std::string& toSplit


bool FileSystem_FileExists(const PATH_STRING& path)
{
DWORD attributes = GetFileAttributesW(path.c_str());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
}

int main(int argc, char *argv[])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move all function implementations above main to a better spot

}

std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> utf16conv;
std::wstring command = utf16conv.from_bytes(processName) + L" " + utf16conv.from_bytes(args);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop the std:: here

#include "common.h"
#include "FileSystem.h"

PATH_STRING Upgrader_GetHighestAvailableVersionFilePath();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename file to Upgrader.h

@@ -31,9 +31,13 @@ enum ReturnCode
PipeReadFailed = 8,
FailureToDownload = 9,
PathNameError = 10,
InvalidCommand = 11,
InvalidResponse = 12,
Copy link
Member Author

@wilbaker wilbaker Aug 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix spacing (here and below)

@wilbaker
Copy link
Member Author

Closing this PR for now, will re-open when this work has higher priority

@wilbaker wilbaker closed this Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move hooks implementation to C++
1 participant